package org.jackysoft.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;

import org.apache.struts2.json.annotations.JSON;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.Basic;
/**
 *  这个用来保存每个office模板实例
 * */
@SuppressWarnings("serial")
@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class OfficeDocument extends WorkflowAppendiceItem {

	private boolean onDisk;
	
	private byte[] collateData = new byte[0];

		
	@Basic
	public boolean isOnDisk() {
		return onDisk;
	}

	public void setOnDisk(boolean onDisk) {
		this.onDisk = onDisk;
	}

	public void setCollateData(byte[] collateData) {
		this.collateData = collateData;
	}

	/**
	 * 整理后的office内容
	 * */
	@Lob
	@Column(length = 256 * 65536)
	@JSON(serialize=false)
	public byte[] getCollateData() {
		return collateData;
	}

}
